#import "KineticOnwardController.h"
        
#import "KineticOnwardModel.h"
#import "KineticOnwardCell.h"
#import "Masonry.h"

@interface KineticOnwardController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *mingleCollectionView;
@property (nonatomic, strong) NSMutableArray *quenchModels;

@end

@implementation KineticOnwardController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self knotConfigsui];
	[self keepsakeloadData];
}


//: 获取数据模型
- (void)keepsakeloadData {
	
}

- (void)knotConfigsui {
    UICollectionViewFlowLayout *quench = [[UICollectionViewFlowLayout alloc] init];
    quench.minimumLineSpacing = 10;
    quench.minimumInteritemSpacing = 10;
    quench.itemSize = CGSizeMake(100, 100);
    quench.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.mingleCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:quench];
    self.mingleCollectionView.backgroundColor = UIColor.clearColor;
    self.mingleCollectionView.delegate = self;
    self.mingleCollectionView.dataSource = self;
    self.mingleCollectionView.showsHorizontalScrollIndicator = NO;
    self.mingleCollectionView.showsVerticalScrollIndicator = NO;
    [self.mingleCollectionView registerClass:[KineticOnwardCell class] forCellWithReuseIdentifier:NSStringFromClass([KineticOnwardCell class])];
    
    [self.view addSubview:self.mingleCollectionView];
    [self.mingleCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)quenchModels {
	if (!_quenchModels) {
		_quenchModels = [NSMutableArray array];
	}
	return _quenchModels;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.quenchModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    KineticOnwardCell *vortexCascadeKingdom = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([KineticOnwardCell class]) forIndexPath:indexPath];
    return vortexCascadeKingdom;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
